{% extends "bash.html" %}

{% block bar %}
    <div class="col-md-9" style="justify-content:flex-end;">
        <h1 class="page-header">出版社管理页面</h1>
        <div class="panel panel-primary">
            <!-- Default panel contents -->
            <div class="panel-heading">出版社列表<i class="fa fa-thumb-tack pull-right"></i></div>
            <div class="panel-body">
                <div class="row" style="margin-bottom: 15px">
                    <div class="col-md-4">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="Search for...">
                            <span class=" input-group-btn">
                        <button class="btn btn-default" type="button">搜索</button></span>
                        </div><!--/input-group--></div>
                    <!--/.col-md-4-->
                    <div class="col-md-2 pull-right">
                        <a class="btn btn-success" href="/app01/add_publisher/">新增出版社</a>
                    </div>
                </div>
            </div>

            {% block main %}
                <table border="1" class="table table-hover table-bordered">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>出版社id</th>
                        <th>名称</th>
                        <th>地址</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for publisher in publisher_list %}
                        <tr>
                            <td>{{ forloop.counter }}</td>
                            <td>{{ publisher.id }}</td>
                            <td>{{ publisher.name }}</td>
                            <td>{{ publisher.address }}</td>
                            <td>
                                <a href="/app01/edit_publisher/?id={{ publisher.id }}">修改</a>
                                <a href="/app01/delete_publisher/?id={{ publisher.id }}">删除</a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>

            {% endblock %}
            <!-- 页码-->
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
{% endblock %}
